# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

_pkgname=linkify-it-py
pkgname=python-$_pkgname
pkgver=2.0.2
pkgrel=1
pkgdesc='Links recognition library with full unicode support'
arch=('any')
url='https://github.com/tsutsu3/linkify-it-py'
license=('MIT')
depends=('python-uc-micro-py')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('141002cf5c2b2760f242eb1d294833437e0df0caf671103ddb6099a083e2b6e8f20f35508b164b14206ceae2ffecb5361aa4d839152f7c52f3cfa83e905f12a7')

build() {
  cd $_pkgname-$pkgver

  python -m build
}

check() {
  cd $_pkgname-$pkgver

  python -m pytest
}

package() {
  cd $_pkgname-$pkgver

  python -m installer -d "$pkgdir" dist/*.whl

  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim:set ts=2 sw=2 et:
